package week8;

public class Car extends Transport{
    private String fuel;

    public Car(String name,int speed,String fuel){
        super(name,speed);
        this.fuel=fuel;
    }

    public Car(){}

    @Override
    public void moveWay(){
        System.out.println(super.getName()+"的燃料类型为："+fuel);
    }

    @Override
    public void showInfo(){
        System.out.println("交通工具:" + super.getName());
        moveWay();
        System.out.println(super.getName()+"速度是:" + super.getSpeed());
    }


}
